home *** CD-ROM | disk | FTP | other *** search
/ Amiga CD-Sensation: Golden Games / Amiga CD-Sensation - Ausgabe 2 - Golden Games (1996)(GTI - Schatztruhe)(DE)[!].iso / Various / Tiles / TilesScreen.mod < prev   
Text File  |  1989-08-27  |  3KB  |  95 lines

  1. (*
  2. This module initializes the window and screen for
  3. the trails program.
  4.  
  5. Created: 5/24/86 by Richie Bielak
  6.  
  7. Modified:
  8.  
  9. Copyright (c) 1986 by Richard Bielak
  10.  
  11. This program maybe freely copied. But please
  12. leave my name in. Thanks.....Richie
  13.  
  14. Turned into TilesScreen by Todd Lewis in 1988.  Thanks alot Richie!
  15. *)
  16. IMPLEMENTATION MODULE TilesScreen;
  17.  
  18. FROM SYSTEM    IMPORT ADR, BYTE, ADDRESS, SETREG, NULL;
  19. FROM Intuition IMPORT
  20.      WindowFlags, NewWindow, IDCMPFlags, IDCMPFlagSet, WindowFlagSet,
  21.      WindowPtr, ScreenPtr, CustomScreen;
  22. FROM Windows   IMPORT OpenWindow, ReportMouse;
  23. FROM Views     IMPORT Hires, ModeSet;
  24. FROM Screens   IMPORT OpenScreen, NewScreen;
  25. FROM Text      IMPORT TextAttr, NormalStyle, FontFlags,FontFlagSet;
  26. FROM AmigaUtils IMPORT BPTRFromPtr;
  27.  
  28. VAR
  29.   MyWindow : NewWindow;
  30.   MyScreen : NewScreen;
  31.   ScreenName : ARRAY [0..20] OF CHAR;
  32.   FontName   : ARRAY [0..20] OF CHAR;
  33.   MyFont   : TextAttr;
  34.  
  35. PROCEDURE InitScreen (VAR s : NewScreen);
  36.   BEGIN
  37.     ScreenName := " Tiles! ";
  38.     FontName   := "topaz.font";
  39.     WITH MyFont DO
  40.       taName := BPTRFromPtr( ADR(FontName) );
  41.       taYSize:= 8; (* TOPAZ_EIGHTY *)
  42.       taStyle:= NormalStyle;
  43.       taFlags:= FontFlagSet{ROMFont};
  44.       END;
  45.     WITH s DO
  46.       LeftEdge := 0; TopEdge := 0; 
  47.       Width := 640; Height := 200;
  48.       Depth := 4;
  49.       DetailPen := BYTE (0); BlockPen := BYTE (1);
  50.       ViewModes := ModeSet {Hires};
  51.       Type := CustomScreen;
  52.       Font := ADR(MyFont);
  53.       DefaultTitle := ADR (ScreenName);
  54.       Gadgets := NULL;
  55.       CustomBitMap := NULL
  56.     END;
  57.   END InitScreen;
  58.  
  59. PROCEDURE InitWindow (VAR w : NewWindow);
  60.   BEGIN
  61.     WITH w DO
  62.       LeftEdge := 0; TopEdge := 0; Width := 640; Height := 200;
  63.       DetailPen := BYTE (0);
  64.       BlockPen := BYTE (1);
  65.       Title := NULL;
  66.       Flags := WindowFlagSet {Activate, Borderless, BackDrop,
  67.                      ReportMouseFlag };
  68.       IDCMPFlags := IDCMPFlagSet{CloseWindowFlag, MenuPick, ReqClear,
  69.            MouseButtons, MouseMove, GadgetUp, GadgetDown};
  70.  
  71.       Type := CustomScreen;
  72.       CheckMark := NULL;
  73.       FirstGadget := NULL;
  74.       Screen := sp;
  75.       BitMap := NULL;
  76.       MinWidth := 10; MinHeight := 10;
  77.       MaxWidth := 640; MaxHeight := 200;
  78.     END
  79.   END InitWindow;
  80.  
  81. PROCEDURE SetUpScreen;
  82.   BEGIN
  83.     InitScreen (MyScreen);
  84.     (* Define a new screen *)
  85.     sp := OpenScreen (ADR(MyScreen));
  86.     InitWindow (MyWindow);
  87.     (* Now open the window *)
  88.     wp := OpenWindow (MyWindow);
  89.   END SetUpScreen;
  90.  
  91. BEGIN
  92. END TilesScreen.
  93.  
  94.  
  95.